﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using TomShane.Neoforce.Controls;


namespace Etapa1.HUD
{
    public class WindowManager
    {
        private static Manager _manager;
        private Dictionary<String, Window> _windows;
        private Dictionary<String, Button> _buttons;
        private Dictionary<String, ScrollBar> _scroolbar;
        private Dictionary<String, ImageBox> _imagebox;
        private Dictionary<String, TextBox> _textbox;

        private Game _game;
        private GraphicsDeviceManager _graphics;

        public static Manager getManager()
        {
          return _manager;
        }

        public WindowManager(Game game, GraphicsDeviceManager gd)
        {
            _game = game;
            _graphics = gd;

            _manager = new Manager(_game, _graphics, "Default", true);
            _manager.SkinDirectory = @"..\..\..\Skins\" ;
            _windows = new Dictionary<string, Window>();
            
        
        }

        public void openWindow(string name)
        {
            _windows[name].Visible = true;
        
        }
        public void AddWindow(string name,string title, int Height, int Width)
        {
            Window window;
            window = new Window(_manager);
            window.Init();
            window.Text = title;
            window.Width = Width;
            window.Height = Height;
            window.Center();
            window.Visible = true;

            _windows.Add(name, window);
            _manager.Add(window);
        
        }
        public void removeWindow(string name)
        {
            _windows.Remove(name);
        
        }


    }
}
